<?php defined('SYSPATH') or die('No direct access allowed.');


class Model_Desktop_Link extends ORM {

		// Relationships
	protected $_belongs_to = array('item' => array('model' => 'desktop_item','foreign_key' => 'item_id'));
        
        public function rules()
	{
		return array(
			'link' => array(
				array('not_empty'),
				array('max_length', array(':value', 127)),
			)                    
		);
	}
        
        public function filters()
	{
		return array(
			'link' => array(
                                //xss clean
				array(array('Security', 'xss_clean')),
                                array('trim')
			)              
		);
	}
        
        public function labels()
	{
		return array(
			'link'         => __('Link')
		);
	}
}